def euler_sieve(n:int) -> list[int]:

    is_prime = [True]*(n+1)
    primes = []
    for i in range(2,n+1):
        if is_prime[i]:
            primes.append(i)
        
        # The magic show is here????
        for p in primes:

            if i*p > n:
                break

            is_prime[i*p] = False
            
            if i%p == 0:
                break
    return primes

if __name__ == "__main__":
    print(euler_sieve(10000))
